
class Vector:
    def __init__(self, x, y) :
        self.x, self.y = x, y
    def __add__(self, other) :
        return Vector(self.x+other.x, self.y+other.y)
    def __mul__(self, other) : 
        if type(other) == int :
            return Vector(self.x*other, self.y*other)
        return self.x*other.x + self.y*other.y
    def __rmul__(self, other) : 
        return Vector(self.x*other, self.y*other)
    def __str__(self) :
        return "|" + str(self.x) + "," + str(self.y) + "|"
    